// Copyright (c) 2006 Zorm
// Released under the MIT License

#ifndef RADARINFORMATION_H
#define RADARINFORMATION_H
#pragma once

struct PointLatLonR;
typedef std::vector<PointLatLonR *>::iterator VectorPointIter;

class RadarInformation {

public:
	RadarInformation(tstring filename);
	void SetLatitude(double newLatitude) { m_latitude = newLatitude; m_flatitude = 0; }
	void SetLongitude(double newLongitude) { m_longitude = newLongitude; m_flongitude = 0; }
	double GetLatitude() { return m_latitude; }
	double GetLongitude() { return m_longitude; }
	void SetPanX(double newX) { m_panx = -newX; }
	void SetPanY(double newY) { m_pany = newY; }
	double GetPanX() { return -m_panx; }
	double GetPanY() { return m_pany; }
	double GetFocusX() { return m_focusx; }
	double GetFocusY() { return m_focusy; }
	void SetFocusX(double newX) { m_focusx = -newX; }
	void SetFocusY(double newY) { m_focusy = -newY; }
	void FocusMap(double x, double y);
	double GetScale() { return m_scale; }
	std::vector<PointLatLonR *> *GetRadarData() { return &radarData; }
	int FudgeScale(double value, double valueBase) { return int((value - valueBase) * 100000000.0); }
	
	void Draw();
	void IncreaseScale(short delta);
	void DecreaseScale(short delta);
	
private:
	void SetColor(unsigned char level);

	double m_latitude, m_longitude;
	int m_flatitude, m_flongitude;
	double m_centerx, m_centery;
	double m_panx, m_pany;
	double m_scale;
	double m_focusx, m_focusy;
	std::vector<PointLatLonR *> radarData;
	NIDSParser *parser;

};

#endif